/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ThreadClient;

import StaticClass.ArrSocket;
import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Oho
 */
public class Connection extends Thread {

    int port;
    Socket sk = null;

    public Connection(int port) {
        this.port = port;
    }

    public void run() {
        try {
            sk = new Socket(ArrSocket.HOSTNAME, port);
            new ThreadMain(sk).start();

        } catch (UnknownHostException ex) {
            Logger.getLogger(Connection.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Connection.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
